package com.navi168.fwq21.util;

import com.navi168.fwq21.R;
import com.navi168.fwq21.R.layout;
import com.navi168.fwq21.friend.FriendAct;
import com.navi168.fwq21.hyzl.ShowMap;
import com.navi168.fwq21.monitoring.Monitoring;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.Layout;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;

public class MainPage extends Activity {
//	private ImageButton hyzlButton;
	private View hyzl;
	private View hylb;
	private View qchy;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		findViews();
		setListers();
		
	}

	private void setListers() {
		hyzl.setOnClickListener(showmapListener);
		hylb.setOnClickListener(friendlistListener);
		qchy.setOnClickListener(qichelistListener);
	}

	private void findViews() {
		hyzl = findViewById(R.id.hyzl_m_layout);
		hylb = findViewById(R.id.hylb_m_layout);
		qchy = findViewById(R.id.qchy_m_layout);

	}

	Button.OnClickListener showmapListener = new Button.OnClickListener() {

		@Override
		public void onClick(View v) {
			Intent it = new Intent(MainPage.this, ShowMap.class);
			startActivity(it);

		}
	};
	
	Button.OnClickListener friendlistListener = new Button.OnClickListener() {

		@Override
		public void onClick(View v) {
			Intent it = new Intent(MainPage.this, FriendAct.class);
			startActivity(it);

		}
	};
	
	Button.OnClickListener qichelistListener = new Button.OnClickListener() {

		@Override
		public void onClick(View v) {
			Intent it = new Intent(MainPage.this, Monitoring.class);
			startActivity(it);

		}
	};

}
